/*
 Navicat Premium Data Transfer

 Source Server         : MyDB
 Source Server Type    : SQL Server
 Source Server Version : 13005026 (13.00.5026)
 Source Host           : 127.0.0.1:1433
 Source Catalog        : MyCmpDb
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 13005026 (13.00.5026)
 File Encoding         : 65001

 Date: 12/05/2023 16:49:17
*/


-- ----------------------------
-- Table structure for ApplicationInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[ApplicationInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[ApplicationInfo]
GO

CREATE TABLE [dbo].[ApplicationInfo] (
  [SettingKay] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SettingValue] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[ApplicationInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of ApplicationInfo
-- ----------------------------

-- ----------------------------
-- Table structure for BusinessLog
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[BusinessLog]') AND type IN ('U'))
	DROP TABLE [dbo].[BusinessLog]
GO

CREATE TABLE [dbo].[BusinessLog] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [BusinessType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BusinessName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BusinessData] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BusinessContent] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BusinessTime] datetime2(7)  NULL,
  [BusinessTend] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[BusinessLog] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of BusinessLog
-- ----------------------------
SET IDENTITY_INSERT [dbo].[BusinessLog] ON
GO

SET IDENTITY_INSERT [dbo].[BusinessLog] OFF
GO


-- ----------------------------
-- Table structure for DeptInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[DeptInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[DeptInfo]
GO

CREATE TABLE [dbo].[DeptInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [DeptName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptDes] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptAddress] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptRegisterFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptCheckFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptPrice] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[DeptInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of DeptInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[DeptInfo] ON
GO

INSERT INTO [dbo].[DeptInfo] ([Id], [DeptName], [DeptCode], [DeptDes], [DeptAddress], [DeptRegisterFree], [DeptCheckFree], [DeptPrice]) VALUES (N'1', N'检验科', N'0001', N'做检验', NULL, NULL, NULL, NULL)
GO

SET IDENTITY_INSERT [dbo].[DeptInfo] OFF
GO


-- ----------------------------
-- Table structure for DeviceInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[DeviceInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[DeviceInfo]
GO

CREATE TABLE [dbo].[DeviceInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [DeviceNumber] int  NULL,
  [DeviceName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DevicePartsNumber] int  NULL,
  [DevicePartsName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeviceStatusNum] int  NULL,
  [DeviceStatusName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeviceUpdateTime] datetime2(7)  NULL,
  [DeviceFunc] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeviceConfig] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeviceIP] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DevicePort] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeviceAddress] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeviceRemoteUser] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeviceRemotePwd] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeviceManager] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[DeviceInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of DeviceInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[DeviceInfo] ON
GO

SET IDENTITY_INSERT [dbo].[DeviceInfo] OFF
GO


-- ----------------------------
-- Table structure for DoctorInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[DoctorInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[DoctorInfo]
GO

CREATE TABLE [dbo].[DoctorInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [DoctorName] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [DoctorNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [DeptCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [DoctorSpec] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorDes] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorSchemeTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorPrice] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorRegisterFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorCheckFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorPic] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorRoom] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorType] varchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [DeptName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorSchemeCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorEval] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorTitle] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[DoctorInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of DoctorInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[DoctorInfo] ON
GO

SET IDENTITY_INSERT [dbo].[DoctorInfo] OFF
GO


-- ----------------------------
-- Table structure for InHospitalPayInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[InHospitalPayInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[InHospitalPayInfo]
GO

CREATE TABLE [dbo].[InHospitalPayInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [InHospitalNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientId] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalPayTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalPayAmount] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalBalance] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalPayType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalPayNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalPayMoldl] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalDept] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalDoctor] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalPayState] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[InHospitalPayInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of InHospitalPayInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[InHospitalPayInfo] ON
GO

SET IDENTITY_INSERT [dbo].[InHospitalPayInfo] OFF
GO


-- ----------------------------
-- Table structure for InHospitalPayLog
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[InHospitalPayLog]') AND type IN ('U'))
	DROP TABLE [dbo].[InHospitalPayLog]
GO

CREATE TABLE [dbo].[InHospitalPayLog] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [PatientId] int  NULL,
  [InHospitalNumber] int  NULL,
  [BillNumber] int  NULL,
  [PayOrderNumber] int  NULL,
  [PayAmount] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayBack] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayParyNumber] int  NULL,
  [InHospitalBillName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[InHospitalPayLog] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of InHospitalPayLog
-- ----------------------------
SET IDENTITY_INSERT [dbo].[InHospitalPayLog] ON
GO

SET IDENTITY_INSERT [dbo].[InHospitalPayLog] OFF
GO


-- ----------------------------
-- Table structure for OutPayInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[OutPayInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[OutPayInfo]
GO

CREATE TABLE [dbo].[OutPayInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [PayOrderNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayBills] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayItemName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayItemPrice] money  NULL,
  [PayItemFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayItemNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayItemDept] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayItemDoctor] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayState] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayAmount] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayModel] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayMedPrice] money  NULL,
  [PaySuccess] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayItemUnit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayItemNum] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayMentNo] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PaySendTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PayPayTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientId] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[OutPayInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of OutPayInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[OutPayInfo] ON
GO

SET IDENTITY_INSERT [dbo].[OutPayInfo] OFF
GO


-- ----------------------------
-- Table structure for OutPayLog
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[OutPayLog]') AND type IN ('U'))
	DROP TABLE [dbo].[OutPayLog]
GO

CREATE TABLE [dbo].[OutPayLog] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [BillNumber] int  NULL,
  [BillDetial] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillPrice] money  NULL,
  [BillAmount] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillUnit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillDes] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillCount] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillFreeType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillPreNumber] int  NULL,
  [BillPayNumber] int  NULL,
  [BillParyPayNumber] int  NULL,
  [BillParyPayBills] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillParyPayBackNumber] int  NULL,
  [BillParyPaySeraNumber] int  NULL,
  [BillStatus] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillIsBack] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [BillIsRemove] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientId] int  NOT NULL,
  [PayType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[OutPayLog] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of OutPayLog
-- ----------------------------
SET IDENTITY_INSERT [dbo].[OutPayLog] ON
GO

SET IDENTITY_INSERT [dbo].[OutPayLog] OFF
GO


-- ----------------------------
-- Table structure for PatientInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[PatientInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[PatientInfo]
GO

CREATE TABLE [dbo].[PatientInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [PatientName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientSex] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientAge] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientBirthday] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientNation] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientPhone] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientIdCard] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientMedCard] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientHealCard] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientVistCard] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientId] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientCreatTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientAddress] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientInHospitalDept] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientInHospitalTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientInHospitalDoctor] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [IsInHospital] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [Balance] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[PatientInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of PatientInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[PatientInfo] ON
GO

INSERT INTO [dbo].[PatientInfo] ([Id], [PatientName], [PatientSex], [PatientAge], [PatientBirthday], [PatientNation], [PatientPhone], [PatientIdCard], [PatientMedCard], [PatientHealCard], [PatientVistCard], [PatientId], [PatientCreatTime], [PatientAddress], [PatientInHospitalDept], [PatientInHospitalTime], [PatientInHospitalDoctor], [IsInHospital], [Balance]) VALUES (N'1', N'测试', N'男', N'21', N'2002-05-21', N'汉', N'15565658585', N'132624199602012545', N'123', N'123', N'123', N'123', N'2023-05-11 08:09:20.5366667', N'未知', N'123', N'2023-05-11 08:09:20.5366667', N'测试医生', N'0', NULL)
GO

SET IDENTITY_INSERT [dbo].[PatientInfo] OFF
GO


-- ----------------------------
-- Table structure for PayorInHospitalPayInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[PayorInHospitalPayInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[PayorInHospitalPayInfo]
GO

CREATE TABLE [dbo].[PayorInHospitalPayInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [ItemName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ItemUnit] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ItemPrice] money  NULL,
  [ItemAmount] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ItemBills] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ItemTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ItemSendTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientId] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [InHospitalNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ItemType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[PayorInHospitalPayInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of PayorInHospitalPayInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[PayorInHospitalPayInfo] ON
GO

SET IDENTITY_INSERT [dbo].[PayorInHospitalPayInfo] OFF
GO


-- ----------------------------
-- Table structure for PrintLog
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[PrintLog]') AND type IN ('U'))
	DROP TABLE [dbo].[PrintLog]
GO

CREATE TABLE [dbo].[PrintLog] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [PatientId] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PrintNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PrintCount] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PrintStatus] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PrintType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PrintContent] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PrintBackFun] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PrintName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[PrintLog] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of PrintLog
-- ----------------------------
SET IDENTITY_INSERT [dbo].[PrintLog] ON
GO

SET IDENTITY_INSERT [dbo].[PrintLog] OFF
GO


-- ----------------------------
-- Table structure for RegisterInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[RegisterInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[RegisterInfo]
GO

CREATE TABLE [dbo].[RegisterInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [RegisterNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterNo] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterPayNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [Sche] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [OrderName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [OrderType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [OrderNum] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SchePrice] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheCheckFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheRegisterFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheDate] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterPayOtherNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterModel] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterMedData] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterPatientId] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[RegisterInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of RegisterInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[RegisterInfo] ON
GO

SET IDENTITY_INSERT [dbo].[RegisterInfo] OFF
GO


-- ----------------------------
-- Table structure for RegisterLog
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[RegisterLog]') AND type IN ('U'))
	DROP TABLE [dbo].[RegisterLog]
GO

CREATE TABLE [dbo].[RegisterLog] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [RegisterNumber] int  NULL,
  [RegisterType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [CheckFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterPrice] money  NULL,
  [RegisterDept] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterDeptCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterDoctorName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterDoctorNumber] int  NULL,
  [RegisterAddress] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterPayNumber] int  NULL,
  [RegisterPayCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterParyCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterTime] datetime2(7)  NULL,
  [RegisterSchemeTime] datetime2(7)  NULL,
  [RegisterOrderNumber] int  NULL,
  [RegisterModelType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [RegisterDes] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PatientId] int  NULL,
  [PayType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[RegisterLog] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of RegisterLog
-- ----------------------------
SET IDENTITY_INSERT [dbo].[RegisterLog] ON
GO

SET IDENTITY_INSERT [dbo].[RegisterLog] OFF
GO


-- ----------------------------
-- Table structure for ScheInfo
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[ScheInfo]') AND type IN ('U'))
	DROP TABLE [dbo].[ScheInfo]
GO

CREATE TABLE [dbo].[ScheInfo] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [ScheCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorNumber] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DeptName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [DoctorName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [OrderName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [OrderType] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [OrderNum] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheTime] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SchePrice] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheCheckFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheRegisterFree] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheDate] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheTimeSpan] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ScheTitle] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[ScheInfo] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of ScheInfo
-- ----------------------------
SET IDENTITY_INSERT [dbo].[ScheInfo] ON
GO

SET IDENTITY_INSERT [dbo].[ScheInfo] OFF
GO


-- ----------------------------
-- Auto increment value for BusinessLog
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[BusinessLog]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table BusinessLog
-- ----------------------------
ALTER TABLE [dbo].[BusinessLog] ADD CONSTRAINT [PK__Business__3214EC07B8379A80] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for DeptInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[DeptInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table DeptInfo
-- ----------------------------
ALTER TABLE [dbo].[DeptInfo] ADD CONSTRAINT [PK__DeptInfo__3214EC07FC8932A8] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for DeviceInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[DeviceInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table DeviceInfo
-- ----------------------------
ALTER TABLE [dbo].[DeviceInfo] ADD CONSTRAINT [PK__DeviceIn__3214EC073F1065EC] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for DoctorInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[DoctorInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table DoctorInfo
-- ----------------------------
ALTER TABLE [dbo].[DoctorInfo] ADD CONSTRAINT [PK__DoctorIn__3214EC07ABEA2FDF] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for InHospitalPayInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[InHospitalPayInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table InHospitalPayInfo
-- ----------------------------
ALTER TABLE [dbo].[InHospitalPayInfo] ADD CONSTRAINT [PK__InHospit__3214EC07AAB21DAD] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for InHospitalPayLog
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[InHospitalPayLog]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table InHospitalPayLog
-- ----------------------------
ALTER TABLE [dbo].[InHospitalPayLog] ADD CONSTRAINT [PK__InHospit__3214EC0775D41737] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for OutPayInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[OutPayInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table OutPayInfo
-- ----------------------------
ALTER TABLE [dbo].[OutPayInfo] ADD CONSTRAINT [PK__OutPayIn__3214EC0771C814C2] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for OutPayLog
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[OutPayLog]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table OutPayLog
-- ----------------------------
ALTER TABLE [dbo].[OutPayLog] ADD CONSTRAINT [PK__OutPayLo__3214EC0765E00745] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for PatientInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[PatientInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table PatientInfo
-- ----------------------------
ALTER TABLE [dbo].[PatientInfo] ADD CONSTRAINT [PK__PatientI__3214EC0703F8BAD0] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for PayorInHospitalPayInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[PayorInHospitalPayInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table PayorInHospitalPayInfo
-- ----------------------------
ALTER TABLE [dbo].[PayorInHospitalPayInfo] ADD CONSTRAINT [PK__PayorInH__3214EC0719093C07] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for PrintLog
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[PrintLog]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table PrintLog
-- ----------------------------
ALTER TABLE [dbo].[PrintLog] ADD CONSTRAINT [PK__PrintLog__3214EC07649243D8] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for RegisterInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[RegisterInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table RegisterInfo
-- ----------------------------
ALTER TABLE [dbo].[RegisterInfo] ADD CONSTRAINT [PK__Register__3214EC07D460094F] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for RegisterLog
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[RegisterLog]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table RegisterLog
-- ----------------------------
ALTER TABLE [dbo].[RegisterLog] ADD CONSTRAINT [PK__Register__3214EC0728A2DEAB] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for ScheInfo
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[ScheInfo]', RESEED, 1)
GO


-- ----------------------------
-- Primary Key structure for table ScheInfo
-- ----------------------------
ALTER TABLE [dbo].[ScheInfo] ADD CONSTRAINT [PK__ScheInfo__3214EC07129DC595] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

